﻿using System.Collections.Generic;
using Toolkit.Web.Infastructure;

namespace Toolkit.Web.ViewComponents.Notification
{
    public sealed class Notification : ViewComponentBase
    {
        public Notification(IViewComponentWriter writer, NotificationType type)
            : base(writer)
        {
            Type = type;
            Title = new HtmlTemplate();
            MessageList = new List<HtmlTemplate>();
            HtmlBuilder = new NotificationHtmlBuilder(this);
        }

        public NotificationType Type
        {
            get;
            private set;
        }

        public HtmlTemplate Title
        {
            get;
            private set;
        }

        public IList<HtmlTemplate> MessageList
        {
            get;
            private set;
        }

        public bool HideNotificationIfThereAreNoMessages
        {
            get;
            set;
        }
    }
}
